package com.duobaoyu.dby.supply.api.remote.feign;

import com.duobaoyu.dby.common.core.constant.SecurityConstants;
import com.duobaoyu.dby.common.core.util.R;
import com.duobaoyu.dby.supply.common.biz.remote.to.config.MappingTO;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * @Author chenll
 * @Date 2023/4/3
 */
@FeignClient(contextId = "remoteSupplyChainBizStateInfoService", value = "dby-supply-chain-biz-api")
public interface RemoteSupplyChainBizStateInfoService {

	@GetMapping("/api/state-info/state")
	@ApiOperation(value = "获取供应链枚举信息", tags = "stateCode:CHANNEL_CODE-渠道;label:real-实物;ifDeprecated是否过滤过期的 true-过滤 false-不过滤")
	R<List<MappingTO>> getState(@RequestParam("stateCode") String stateCode, @RequestParam("label") String label, @RequestParam("ifDeprecated") Boolean ifDeprecated, @RequestHeader(SecurityConstants.FROM) String from);

	@GetMapping("/api/state-info/state")
	@ApiOperation(value = "获取供应链枚举信息", tags = "stateCode:CHANNEL_CODE-渠道;label:real-实物")
	R<List<MappingTO>> getState(@RequestParam("stateCode") String stateCode, @RequestParam("label") String label, @RequestHeader(SecurityConstants.FROM) String from);

	@GetMapping("/api/state-info/state")
	@ApiOperation(value = "获取供应链枚举信息", tags = "stateCode:CHANNEL_CODE-渠道;")
	R<List<MappingTO>> getState(@RequestParam("stateCode") String stateCode, @RequestHeader(SecurityConstants.FROM) String from);
}
